﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class TrainingConfigers : IEntityTypeConfiguration<Training>
    {
        public void Configure(EntityTypeBuilder<Training> builder)
        {
            builder.ToTable(nameof(Training));
            builder.Property(x => x.MajorKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.MajorKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.MajorId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.MajorName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.HumanId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.HumanName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.TrainingItem).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.TrainingTime).IsRequired(false);
            builder.Property(x => x.TrainingHour).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.TrainingDegree).IsRequired(false);
            builder.Property(x => x.Register).IsRequired(false);
            builder.Property(x => x.Checker).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.RegistTime).IsRequired(false);
            builder.Property(x => x.CheckTime).IsRequired(false);
            builder.Property(x => x.Checkstatus).IsRequired(false);
            builder.Property(x => x.Remark).IsRequired(false).HasMaxLength(60);
        }
    }
}
